/*

* ------------------------------------------------------------------------
* ------------------------------------------------------------------------
* |     Smart-Shop开源商城系统/ Java商城-首选电商平台系统 请务必保留此注释头信息
* |     开源地址: https://gitee.com/ningbo-qishan/gruul-mall
* ------------------------------------------------------------------------
* ------------------------------------------------------------------------
* |     可正常分享和学习源码,未经授权 不可商用！
* |     商业版中台购买/开源版商业授权 联系技术客服
* |     官网:  https://www.73app.cn/
* ------------------------------------------------------------------------
* ------------------------------------------------------------------------
* |     Copyright (c) 2016-2999 宁波启山智软科技有限公司
* |     版权所有 ,侵权必究！
* ------------------------------------------------------------------------

*/
package com.medusa.gruul.platform.api.entity;

import java.math.BigDecimal;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;

import java.time.LocalDateTime;

import com.medusa.gruul.common.core.validator.group.AddGroup;
import com.medusa.gruul.common.core.validator.group.UpdateGroup;
import com.medusa.gruul.common.data.base.BaseNoTenantEntity;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotBlank;

/**
 * <p>
 * 代理商信息表
 * </p>
 *
 * @author whh
 * @since 2020-10-04
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("t_agent_info")
@ApiModel(value = "AgentInfo对象", description = "代理商信息表")
public class AgentInfo extends BaseNoTenantEntity {

    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    @ApiModelProperty(value = "id")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 账户
     */
    @ApiModelProperty(value = "账户")
    @TableField("account")
    private String account;

    /**
     * 密码
     */
    @ApiModelProperty(value = "密码")
    @TableField("pwd")
    private String pwd;

    /**
     * 邀请码
     */
    @ApiModelProperty(value = "邀请码")
    @TableField("code")
    private String code;

    /**
     * 联系人
     */
    @ApiModelProperty(value = "联系人")
    @TableField("link_name")
    private String linkName;

    /**
     * 所在区域
     */
    @ApiModelProperty(value = "所在区域")
    @TableField("region")
    private String region;

    /**
     * 联系地址
     */
    @ApiModelProperty(value = "联系地址")
    @TableField("address")
    private String address;

    /**
     * 手机号
     */
    @ApiModelProperty(value = "手机号")
    @TableField("phone")
    private String phone;

    /**
     * 邮箱地址
     */
    @ApiModelProperty(value = "邮箱地址")
    @TableField("email")
    private String email;

    /**
     * 1:代理商 2:直属渠道商 3:间接渠道商
     */
    @ApiModelProperty(value = "1:代理商 2:直属渠道商 3:间接渠道商")
    @TableField("type")
    private Integer type;

    /**
     * 代理到期时间
     */
    @ApiModelProperty(value = "代理到期时间")
    @TableField("next_due_time")
    private LocalDateTime nextDueTime;

    /**
     * 满足代理目标到期自动续签时长 0不自动续期  1-自动续签
     */
    @ApiModelProperty(value = "满足代理目标到期自动续签时长 0不自动续期  1-自动续签")
    @TableField("is_auto_times")
    private Integer isAutoTimes;

    /**
     * 折扣
     */
    @ApiModelProperty(value = "折扣")
    @TableField("discount")
    private BigDecimal discount;

    /**
     * 可用金额
     */
    @ApiModelProperty(value = "可用金额")
    @TableField("available_amount")
    private BigDecimal availableAmount;

    /**
     * 冻结金额
     */
    @ApiModelProperty(value = "冻结金额")
    @TableField("freeze_amount")
    private BigDecimal freezeAmount;

    /**
     * 已经分帐金额
     */
    @ApiModelProperty(value = "已经分帐金额")
    @TableField("sub_Ledger_amount")
    private BigDecimal subLedgerAmount;

    /**
     * 已使用金额
     */
    @ApiModelProperty(value = "已使用金额")
    @TableField("used_amount")
    private BigDecimal usedAmount;

    /**
     * 代理商分润 单位%
     */
    @ApiModelProperty(value = "代理商分润 单位%")
    @TableField("agent_share_profit")
    private Integer agentShareProfit;

    /**
     * 渠道商分润 单位%
     */
    @ApiModelProperty(value = "渠道商分润 单位%")
    @TableField("channel_share_profit")
    private Integer channelShareProfit;

    /**
     * 1:正常 2:冻结 3:停用
     */
    @ApiModelProperty(value = "代理狀態 1:正常 2:冻结 3:停用")
    @TableField("status")
    private Integer status;

    /**
     * 父节点id，间接渠道商时有值，代理商和直属渠道商时为0
     */
    @ApiModelProperty(value = "父节点id，间接渠道商时有值，代理商和直属渠道商时为0")
    @TableField("parent_id")
    private Long parentId;

    @ApiModelProperty(value = "企业名称")
    @TableField("enterprise")
    private String enterprise;

    @ApiModelProperty(value = "企业类型编号")
    @TableField("enterprise_type")
    private String enterpriseType;


    @ApiModelProperty(value = "公司规模编号")
    @TableField("scale_code")
    private String scaleCode;


    @ApiModelProperty(value = "注册方式 1.官网自行注册  2.商户控制台注册  3.代理商后台")
    @TableField("register_type")
    private Integer registerType;

}
